]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell/screenshot: Don't use region type where rect is enough
authorBilal Elmoussaoui <belmouss@redhat.com>
Mon, 10 Jun 2024 22:45:09 +0000 (00:45 +0200)
committerBilal Elmoussaoui <belmouss@redhat.com>
Mon, 10 Jun 2024 23:12:00 +0000 (01:12 +0200)
New API added in
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3801

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3366>

src/shell-screenshot.c

index 5c4885d39cd35cb4fe7092c160ba8c972d51f0b4..a2503c3f356a1ec58bbdcfce4ab87416de7b5e18 100644 (file)
@@ -376,7 +376,6 @@ draw_cursor_image (cairo_surface_t *surface,
   MetaDisplay *display;
   MetaCursorTracker *tracker;
   cairo_surface_t *cursor_surface;
-  g_autoptr (MtkRegion) screenshot_region = NULL;
   cairo_t *cr;
   int x, y;
   int xhot, yhot;
@@ -390,12 +389,11 @@ draw_cursor_image (cairo_surface_t *surface,
   if (!texture)
     return;
 
-  screenshot_region = mtk_region_create_rectangle (&area);
   meta_cursor_tracker_get_pointer (tracker, &point, NULL);
   x = point.x;
   y = point.y;
 
-  if (!mtk_region_contains_point (screenshot_region, point.x, point.y))
+  if (!mtk_rectangle_contains_point (&area, point.x, point.y))
     return;
 
   meta_cursor_tracker_get_hot (tracker, &xhot, &yhot);